package com.example.demo.controller;

import com.example.demo.entity.TestBody;
import org.springframework.web.bind.annotation.*;


@RequestMapping("/")
@RestController
public class TestController {


    @GetMapping("/test")
    public TestBody testBody(@RequestParam String p1) {
        TestBody testBody = new TestBody();
        testBody.setName("test");
        return testBody;
    }

    @PostMapping("/save")
    public TestBody save(@RequestBody TestBody testBody) {
        testBody.setName("test");
        return testBody;
    }

}
